#pragma once

using namespace EnvDTE80;
using namespace EnvDTE;
using namespace System;
using namespace System::Collections;
using namespace Microsoft::VisualStudio::CommandBars;
using namespace System::Reflection;

namespace Serika
{
	public ref class CommandManager
	{
	public:
		CommandManager(DTE2^ dte, AddIn^ addIn);
		~CommandManager();

	public:
		void AddCommand(String^ cmdName, String^ dispName, String^ toolTip, bool msoBtn, Object^ bitmap, array<String^>^ menus);
		void DelCommand(String^ cmdName, array<String^>^ menus);

	private:
		CommandBar^ GetMenu(array<String^>^ menus);
		Command^ AddCommand(String^ cmdName, String^ dispName, String^ toolTip, bool msoBtn, Object^ bitmap);
		CommandBar^ GetRootMenu(String^ menu);
		CommandBar^ GetMenu(String^ menu, CommandBar^ bar);

	private:
		DTE2^ mDte;
		AddIn^ mAddIn;
	};
}
